---
title: "Reference: Workflow.sendEvent() | Workflows"
description: Documentation for the `Workflow.sendEvent()` method in workflows, which resumes execution when an event is sent.
---

# Workflow.sendEvent()

The `.sendEvent()` resumes execution when an event is sent.

## Usage example

```typescript copy
run.sendEvent("event-name", { value: "data" });
```

## Parameters

<PropertiesTable
  content={[
    {
      name: "eventName",
      type: "string",
      description: "The name of the event to send",
      isOptional: false,
    },
    {
      name: "step",
      type: "Step",
      description: "The step to resume after the event is sent",
      isOptional: false,
    },
  ]}
/>

## Returns

<PropertiesTable
  content={[
    {
      name: "workflow",
      type: "Workflow",
      description: "The workflow instance for method chaining",
    },
  ]}
/>

## Extended usage example

```typescript showLineNumbers copy
import { mastra } from "./mastra";

const run = await mastra.getWorkflow("testWorkflow").createRun();

const result = run.start({
  inputData: {
    value: "hello",
  },
});

setTimeout(() => {
  run.sendEvent("event-name", { value: "from event" });
}, 3000);
```

> In this example, avoid using `await run.start()` directly, as it would block sending the event before the workflow reaches its waiting state.

## Related

- [.waitForEvent()](./waitForEvent)
- [Suspend & Resume](/docs/v1/workflows/suspend-and-resume#sleep--events)
